package com.vr.caricature.common;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by chengxiaozhi on 2016/11/3.
 */

public class MainPageAdapter extends FragmentPagerAdapter {

    private List<Fragment> mList;


    public MainPageAdapter(FragmentManager fm , List<Fragment> fragments) {
        super(fm);
        this.mList = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mList.get(position);
    }

    @Override
    public int getCount() {
        return mList.size();
    }
}
